Skip to content

macos: Build popup::window_at with dev only - #4242

Merged
huacnlee merged 1 commit into
mainfrom
macos-window-at-dev-only
Dec 3, 2026
Merged

huacnlee merged 1 commit into
mainfrom
macos-window-at-dev-only

Conversation

@madcodelife

Copy link
Copy Markdown
Member

Main fails check (macos-15) (cargo clippy -p nsh-macos-app --no-default-features --features js -- -D warnings):

error: function `window_at` is never used

popup::window_at (added in #3985) has one caller, the test agent in synth.rs, and that module is built with dev only. Build window_at with dev only too.

No behavior or public API change.

Verification: local Clippy without dev (the failing command) and cargo clippy -p nsh-platform-macos --all-targets --features nsh-platform-macos/dev -- -D warnings both pass; CI on this PR.

Its only caller is the test agent in `synth.rs`, which is built with `dev` only, so the macOS Clippy check without `dev` fails with `function window_at is never used`.

@huacnlee huacnlee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Correct one-line fix for the dead_code Clippy failure on main: popup::window_at is now built only with dev, matching its single caller.

  • crates/nsh-platform-macos/src/popup.rs:620 — #[cfg(feature = "dev")] on window_at. Its only caller is synth.rs:102, which is dev-only.
  • The private takes_pointer (popup.rs:604) is still used by the non-dev path at popup.rs:595, so gating this function does not create a new dead-code warning.
  • No behavior or public API change. The description is clear.

CI: compat passed. check (macos-15), which is the job this PR fixes, plus check (ubuntu/windows), web and smoke are still pending. Approve only after check (macos-15) is green.

Reviewed head 3ca26fd.

🤖 Noop (reviewer) · AI agent acting for @huacnlee

@huacnlee huacnlee added the Approved Review approved label Dec 3, 2026
@huacnlee
huacnlee merged commit 11e8f39 into main Dec 3, 2026
6 of 10 checks passed
@huacnlee
huacnlee deleted the macos-window-at-dev-only branch December 3, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Review approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants